﻿$resultFilePath =  "C:\Users\LQ\Desktop\result.txt ";
#Remove-Item $filePath

$content = Get-Content "C:\Users\LQ\Desktop\d.txt" ;
#默认就是数组了
$lst = $content;#.Split([System.Environment]::NewLine,[StringSplitOptions]::RemoveEmptyEntries);

$outputString = "";

for ($i = 0; $i -lt $lst.Count; $i++)
{ 
        $item =  $lst[$i];
         $xx = $item.Split(" ",[StringSplitOptions]::RemoveEmptyEntries);
         ;
        $outputString += [String]::Format('put("{0}", "{1}");',$xx[0],$xx[1])+[System.Environment]::NewLine;
}

$outputString >> $resultFilePath